home *** CD-ROM | disk | FTP | other *** search
- ____ ______ __ ___ _____ ____ __________
- / / / ___/ \ \/ / / \ / \ ____ /___ ___/
- / /__ / /__ \ / / <> / / __ \ / \ / /
- / ___/ / __/ / / / _/ \ / / __ \ / /
- / \ / /__ / / / /\ \ \____/ \ / \ \
- /__/\__\ \_____/ /__/ \_/ \__\ \____/ \__\
-
- http://www.weownyourlives.forever
-
-
- RESEARCHING AN ATTACK by Mnemonic
- xkyller@hotmail.com
- 7/27/99
-
- =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
- KeyRoot KeyRoot KeyRoot KeyRoot KeyRoot KeyRoot
- =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
-
- Contents:
-
- 01 - Intro
- 02 - Web browsing
- 03 - Port scanning
- 04 - Determing the method of penetration
- 05 - Making the attack
- 06 - Ok that's it
-
- =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
- Shouts to GRiDMAN for suggesting the topic to me
- =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
-
- 01 - Intro
-
- I don't know why it wasn't obvious for me to write about it earlier.
- Although I'm sure the major audience that will continue reading after the
- intro are script kiddies, I thought about it for a while and decided to go
- ahead with releasing it. This white paper is geared towards people who want
- to single out a system and make an organized attack. Rather than attacking
- a random system you found to be exploitable to a certain security flaw. I
- hope I can be of some help to new security professionals or other hacker-type
- people or anyone else who breaks into systems. When you plan on breaking
- into someone else's system just plan on paying the consequences if you get
- caught. If you don't want to get caught take the necessary precautions.
- You still might get caught.
-
- =-=-=-=-=-=-=-=-=-=
-
- 02 - Web browsing
-
- After you know what system you're attacking you have to get some
- general information about the system like what platform are they running,
- what applications, things like that. A lot of times you can do this just
- by looking through their site. As you look through the take note of what
- it's running like if it says what operating system, what web server,
- firewall, administrative tools, or CGI scripts and remember what versions
- are being used either. The difference between version 1.0 and 3.0 can be
- the difference between a possible attack and no attack. FTP or telnet
- banners could also reveal information about the system.
-
- =-=-=-=-=-=-=-=-=-=
-
- 03 - Port scanning
-
- Port scanning is always a good idea whether you know anything at
- all about the system or not. The results of a port scan can in many
- cases show you what operating system is being run. For example a Unix
- machine wouldn't be running NetBIOS and an NT machine wouldn't be running
- mountd. In addition to this, what Internet applications are being run
- provides different ways you can break in. Like if you know that the
- system is Linux and is running qpop or nlock or some other exploit-able
- program then there's a possibility that you can penetrate the system that
- way. You should keep a temporary log of all port scanning that you do so
- that you can use the information when you actually make your attack. Here
- is an example of a very short port scan:
-
- KeyRoot Port Scanner (KeyScan) v1.0 by Mnemonic
-
- Scanning ip address 127.0.0.1 on ports 21, 23, 56
-
- Scan started 3/6/2020 1:08 am
-
- 127.0.0.1
- 21
- 23
-
- Scan completed 3/6/2020 1:10 am
-
- KeyRoot owns you
-
- I just scanned three ports on my local machine. Two of these ports were
- open (21 and 23). I can pretty much assume that I am running FTP and telnet.
- Other types of scans can determine what applications are being run on
- specific ports.
-
- =-=-=-=-=-=-=-=-=-=
-
- 04 - Determining the method of penetration
-
- Now you should know just about everything you need in order to make
- an attack. When you know what the system is running you basically know what
- it's vulnerable to. You can run some publicly-available exploit, write your
- own exploit, or use publicly-known attacks to penetrate the system. In many
- instances a system may be running programs that are exploitable only when
- you have an account on the system. If that's the case you're going to need
- to get a shell some how like guessing someone's password or something like
- that. Rooting the system means you have complete control over it. You have
- administrator rights.
-
- =-=-=-=-=-=-=-=-=-=
-
- 05 - Making the attack
-
- Ok so now you know how to attack the system go do it. In most cases
- when you're attacking a someone you need to be running the same platform as
- they are. This isn't the case with null connections or with platform-to-
- anotherplatform exploits.
-
- =-=-=-=-=-=-=-=-=-=
-
- 06 - Ok that's it
-
- Ummmm... yeah... peace to all my bro's in on EFNet. NtWaK0 and
- MostHateD and everyone else.
-
- =-=-=-=-=-=-=-=-=-=
-
- KeyRoot: living your life for you
-
- =-=-=-=-=-=-=-=-=-=
-
- 07 - KeyScan.c
-
- -----cut-----
-
- /* KeyScan.c by Mnemonic is just a very simple port scanner
- ____ ______ __ ___ _____ ____ __________
- / / / ___/ \ \/ / / \ / \ ____ /___ ___/
- / /__ / /__ \ / / <> / / __ \ / \ / /
- / ___/ / __/ / / / _/ \ / / __ \ / /
- / \ / /__ / / / /\ \ \____/ \ / \ \
- /__/\__\ \_____/ /__/ \_/ \__\ \____/ \__\
-
- For Linux/FreeBSD
- */
-
- #include <netdb.h>
- #include <netinet/in.h>
- #include <stdio.h>
- #include <string.h>
- #include <sys/socket.h>
- #include <sys/types.h>
-
- #define p0rt putaportnumberherethatyouwanttocheck
-
- int x, s;
- char *str = "KeyScan v1.0 by Mnemonic";
- struct sockaddr_in addr, spoofedaddr;
- struct hostent *host;
-
-
- int openthesock(int sock, char *target, int port) {
- struct sockaddr_in blah;
- struct hostent *he;
- bzero((char *)&blah, sizeof(blah));
- blah.sin_family=AF_INET;
- blah.sin_addr.s_addr=inet_addr(target);
- blah.sin_port=htons(port);
-
-
- if ((he = gethostbyname(target)) != NULL) {
- bcopy(he->h_addr, (char *)&blah.sin_addr, he->h_length);
- }
-
- else {
- if ((blah.sin_addr.s_addr = inet_addr(server)) < 0) {
- perror("gethostbyname()");
- return(-3);
- }
- }
-
- if (connect(sock,(struct sockaddr *)&blah,16)==-1) {
- close(sock);
- return(-4);
- }
-
- return;
- }
-
-
- void main(int argc, char *argv[]) {
-
- printf("\n\nKeyRoot Port Scanner (KeyScan) v1.0 by Mnemonic\n\n");
- printf("Scanning ip address ", target, " on port ", p0rt);
- printf("\n\nScan started about five seconds ago hehehehe");
- printf("\n\n", target);
-
- if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
- printf("\n\nScan completed\n\n");
- printf("KeyRoot owns you");
- exit(-1);
- }
-
- openthesock(s, argv[1], p0rt);
-
- printf("\n ", p0rt);
- printf("\n\nScan completed\n\n");
-
- send(s,str,strlen(str));
- usleep(100000);
- close(s);
- printf("KeyRoot owns you");
- }
-
- -----cut-----